package com.mxpio.erp.common.equipment.entity;

import com.mxpioframework.jpa.annotation.Generator;
import com.mxpioframework.jpa.policy.impl.UUIDPolicy;
import com.mxpioframework.security.annotation.Dict;
import com.mxpioframework.security.entity.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.*;
import java.util.List;

/**
 * 公共参数对象 MB_ERP_EQUIPMENT_COMM_PARAM
 * 
 * @author Cheng
 * @date 2023-06-28
 */
@Data
@EqualsAndHashCode(callSuper=false)
@Entity
@Table(name = "MB_ERP_EQUIPMENT_COMM_PARAM")
@Schema(description="公共参数")
public class EquipmentCommParameters extends BaseEntity {

private static final long serialVersionUID=1L;

    @Id
    @Generator(policy = UUIDPolicy.class)
    @Column(name = "ID_")
    @Schema(description = "主键")
    private String id;

    @Column(name = "PARAM_NAME_")
    @Schema(description = "参数名称")
    private String paramName;

    @Column(name = "PARAM_TYPE_")
    @Schema(description = "参数类型")
    @Dict(dicCode = "ERP_EQUIPMENT_COMM_TYPE")
    private String paramType;

    @Column(name = "UNIT_")
    @Schema(description = "单位")
    @Dict(dicCode = "ERP_EQUIPMENT_COMM_UNIT")
    private String unit;

    @Column(name = "MAX_")
    @Schema(description = "最大值")
    private Double max;

    @Column(name = "MIN_")
    @Schema(description = "最小值")
    private Double min;

    @Column(name = "DEFAULT_VALUE_")
    @Schema(description = "缺省值")
    private String defaultValue;

    @Column(name = "REMARKS_")
    @Schema(description = "备注")
    private String remarks;

    @Column(name = "CHOOSE_ENABLE_")
    @Schema(description = "存在选项")
    @Dict(dicCode = "ERP_COMMON_YESNO")
    private Integer chooseEnable;

    @Transient
    private List<EquipmentCommParametersDetail> commParametersDetails;

}
